package com.example.event_resource_java.authority.mapper.resourceLibrary;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.event_resource_java.authority.domain.resourceLibrary.SecretKey;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;
import java.util.List;

/**
 * (SecretKey)表数据库访问层
 *
 * @author makejava
 * @since 2024-05-09 10:24:37
 */
@Mapper
public interface SecretKeyMapper extends BaseMapper<SecretKey> {

    /**
     * 根据学生id获取教师Id
     * @param userId
     * @return
     */
    Long getTeacherById(@Param("userId") Long userId);

    /**
     * 根据教师id，资源id获取资源
     * @param userId
     * @param allocationId
     */
    List<Long> isAssets(@Param("userId") Long userId, @Param("allocationId") Long allocationId,
                        @Param("nowTime")LocalDateTime nowTime);
}

